<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script>
			function show(obj){
				console.log("对象变了",obj.value);
				obj.nextElementSibling.innerHTML="变了。。"+obj.value;
			}
			function show2(obj){
				obj.previousElementSibling.innerHTML="下拉框变了："+obj.value+","+new Date();
			}
		</script>
	</head>
	<body>
		<input type="text" name="username" placeholder="user name"  onchange="show(this)"/>
		<span></span>
		<select name="city" onchange="show2(this)">
			<option value="hefei">合肥</option>
			<option value="anqing">安庆</option>
			<option value="huainan">淮南</option>
			<option value="六安" selected>六安</option>
		</select>
	</body>
</html>